import Vue from 'vue'
import VueRouter from 'vue-router'
import ProductInfo from '@/views/product_admin/components/product.vue'
import ProductAdmin from '@/views/product_admin/index.vue'
import Register from '@/views/register/index.vue'
import Login from '@/views/login/index.vue'
import System from '@/views/system_admin/index.vue'
import Teacher from '@/views/teacher/index.vue'
import Analysis from '@/views/teacher/analysis/index.vue'
import ProductDB from '@/views/teacher/productDB/index.vue'
import Message from '@/views/teacher/message/index.vue'
import Home from '@/views/home/index.vue'
import Role from '@/views/system_admin/role_manage/index.vue'
import Productmanage from '@/views/system_admin/user_manage/product_manage/index.vue'
import Teachermanage from '@/views/system_admin/user_manage/teacher_manage/index.vue'
import add from "@/views/teacher/add"
import myproduct from "@/views/teacher/myproduct"
import list from "@/views/product_admin/list"
import slist from "@/views/system_admin/list"
import detail from "@/views/teacher/detail.vue"
import Personal from "@/views/teacher/Personal.vue"
import ppersonal from "@/views/product_admin/personal"
import spersonal from "@/views/system_admin/personal"
import notice from "@/views/teacher/notice"
import gg from "@/views/system_admin/gg"
import detail3 from "@/views/teacher/detail3"
import jszy from "@/views/system_admin/jszy"
import  Personal1 from "@/views/teacher/Personal1"
import  plist4 from "@/views/product_admin/plist4"
import  plist3 from "@/views/product_admin/plist3"
import  plist2 from "@/views/product_admin/plist2"
import plist1 from "@/views/product_admin/plist1"
import pinfo5 from "@/views/product_admin/pinfo5"
import pinfo4 from "@/views/product_admin/pinfo4"
import pinfo3 from "@/views/product_admin/pinfo3"
import pinfo2 from "@/views/product_admin/pinfo2"
import pinfo1 from "@/views/product_admin/pinfo1"
import  slist5 from "@/views/system_admin/slist5"
import  slist4 from "@/views/system_admin/slist4"
import  slist3 from "@/views/system_admin/slist3"
import  slist2 from "@/views/system_admin/slist2"
import  slist1 from "@/views/system_admin/slist1"
import sinfo2 from "@/views/system_admin/sinfo2"
import sinfo1 from "@/views/system_admin/sinfo1"
import sinfo3 from "@/views/system_admin/sinfo3"
import sinfo4 from "@/views/system_admin/sinfo4"
import sinfo5 from "@/views/system_admin/sinfo5"
import lwdetail from "@/views/teacher/lwdetail"
import zldetail from "@/views/teacher/zldetail"
import zl from "@/views/teacher/zl"
import kcjxdetail from "@/views/teacher/kcjxdetail"
import jxjldetail from "@/views/teacher/jxjldetail"
import lw from "@/views/teacher/lw"
import jxjl from "@/views/teacher/jxjl"
import kcjx from "@/views/teacher/kcjx"
import kyxmdetail from "@/views/teacher/kyxmdetail"
import kyxm from "@/views/teacher/kyxm"
import xtcs from "@/views/system_admin/xtcs"
import qxgl from "@/views/system_admin/qxgl"
import jszy1 from "@/views/product_admin/jszy1"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path: '/home',
    name: 'home',
    component: Home
  },
  {
    path: '/product',
    name: 'product',
    component: ProductAdmin,
    redirect: '/product/home',
    children: [
      {
        path: 'productinfo',
        name: 'productinfo',
        component: ProductInfo
      },
      {
        path: 'jszy',
          name: 'jszy',
          component: jszy1
        
        
       },
       {
        path: 'gg',
          name: 'gg',
          component: gg
        
        
       },
      {
        path: 'list',
        name: 'list',
        component: list
      },
      {
        path: 'pinfo2',
        name: 'pinfo2',
        component: pinfo2
      },
      {
        path: 'pinfo3',
        name: 'pinfo3',
        component: pinfo3
      },
      {
        path: 'pinfo4',
        name: 'pinfo4',
        component: pinfo4
      },
      {
        path: 'pinfo5',
        name: 'pinfo5',
        component: pinfo5
      },
      
      {
        path: 'pinfo1',
        name: 'pinfo1',
        component: pinfo1
      },
      {
        path: 'list1',
        name: 'list1',
        component: plist1
      },
      {
        path: 'list2',
        name: 'list2',
        component: plist2
      },
      {
        path: 'list3',
        name: 'list3',
        component: plist3
      },
      {
        path: 'list4',
        name: 'list4',
        component: plist4
      },
      
      {
        path: 'home',
        name: 'home',
        component: Home
      },
      {
        path: 'personal',
        name: 'personal',
        component: ppersonal
      },
      
    ]
  },
  {
    path: '/system',
    name: 'system',
    component: System,
    redirect: '/system/home',
    children: [
     {
      path: 'gg',
        name: 'gg',
        component: gg
      
      
     },
     {
      path: 'xtcs',
        name: 'xtcs',
        component: xtcs
      
      
     },
     
     
     {
      path: 'sinfo2',
        name: 'sinfo2',
        component: sinfo2
      
      
     },
     
     {
      path: 'sinfo3',
        name: 'sinfo3',
        component: sinfo3
      
      
     },
     {
      path: 'sinfo4',
        name: 'sinfo4',
        component: sinfo4
      
      
     },
     {
      path: 'sinfo5',
        name: 'sinfo5',
        component: sinfo5
      
      
     },
     
     {
      path: 'sinfo1',
        name: 'sinfo1',
        component: sinfo1
      
      
     },
     {
      path: 'jszy',
        name: 'jszy',
        component: jszy
      
      
     },
     {
      path: 'qxgl',
        name: 'qxgl',
        component: qxgl
      
      
     },
     
     
      {
        path: 'teachermanage',
        name: 'teachermanage',
        component: Teachermanage
      },
      {
        path: 'productmanage',
        name: 'productmanage',
        component: Productmanage
      },
      {
        path: 'home',
        name: 'home',
        component: Home
      },
      {
        path: 'list',
        name: 'list',
        component: slist
      },
      {
        path: 'list2',
        name: 'list2',
        component: slist2
      },
      {
        path: 'list3',
        name: 'list3',
        component: slist3
      },
      {
        path: 'list4',
        name: 'list4',
        component: slist4
      },
      {
        path: 'list5',
        name: 'list5',
        component: slist5
      },
      
      {
        path: 'list1',
        name: 'list1',
        component: slist1
      },
      {
        path: 'personal',
        name: 'personal',
        component: spersonal
      },
    ]
  },
  {
    path: '/teacher',
    name: 'teacher',
    component: Teacher,
    redirect: '/teacher/userhome',
    children: [
      {
        path: 'userhome',
        name: 'userhome',
        component: Analysis
      },
      {
        path: 'detail3',
        name: 'detail3',
        component: detail3
      },
      
      {
        path: 'add',
        name: 'add',
        component: add
      },
      
      {
        path: 'lw',
        name: 'lw',
        component: lw
      },
      {
        path: 'zl',
        name: 'zl',
        component: zl
      },
      {
        path: 'kyxm',
        name: 'kyxm',
        component: kyxm
      },
      
      {
        path: 'kcjx',
        name: 'kcjx',
        component: kcjx
      },
      {
        path: 'jxjl',
        name: 'jxjl',
        component: jxjl
      },
      
      {
        path: 'myproduct',
        name: 'myproduct',
        component: myproduct
      },
      {
        path: 'message',
        name: 'message',
        component: Message
      },
      {
        path: 'productdb',
        name: 'productdb',
        component: ProductDB
      },
      {
        path: 'detail',
        name: 'detail',
        component: detail
      },
      {
        path: 'zldetail',
        name: 'zldetail',
        component: zldetail
      },
      {
        path: 'lwdetail',
        name: 'lwdetail',
        component: lwdetail
      },
      
      {
        path: 'kcjxdetail',
        name: 'kcjxdetail',
        component: kcjxdetail
      },
      {
        path: 'jxjldetail',
        name: 'jxjldetail',
        component: jxjldetail
      },
      
      {
        path: 'kyxmdetail',
        name: 'kyxmdetail',
        component: kyxmdetail
      },
      
      {
        path: 'notice',
        name: 'notice',
        component: notice
      },
      
      {
        path: 'home',
        name: 'home',
        component: Home
      },
      {
        path: 'Personal',
        name: 'Personal',
        component: Personal
      },
      {
        path: 'Personal1',
        name: 'Personal1',
        component: Personal1
      },
      
    ]
  },
  {
    path: '/register',
    name: 'register',
    component: Register,
  }
]

const router = new VueRouter({
  routes
})

export default router
